Class ModuleImpl

java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.ModuleImpl
All Implemented Interfaces:
IPCObject, Module

public class ModuleImpl extends IPCObjectImpl implements Module
Information provided by the PKI file:

    \class Port
    
    \brief Port holds and manipulates the ports on devices.
    
    \example network().getDevice("Router0").getPort("FastEthernet0/0")
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • getModuleNumber

      public int getModuleNumber()
      Information provided by the PKI file:
      
          \brief Returns the number of the module.
          
          \return int, the number of the module.
          
              
      Specified by:
      getModuleNumber in interface Module
      Returns:
      int Returns a int
    • getModuleNameAsString

      public String getModuleNameAsString()
      Information provided by the PKI file:
      
          \brief Returns the number of the module.
          
          \return string, the module name as a string.  Seems to always be "None".
          
              
      Specified by:
      getModuleNameAsString in interface Module
      Returns:
      String Returns a String
    • getSlotPath

      public String getSlotPath()
      Information provided by the PKI file:
      
          \brief Returns slot path.
          
          \return string, the slot path.  For example, "0/0" or "0/1".
          
              
      Specified by:
      getSlotPath in interface Module
      Returns:
      String Returns a String
    • getModuleType

      public ModuleType getModuleType()
      Information provided by the PKI file:
      
          \brief Returns the module type.
          
          \return ModuleType, the number of the module.
          Types: eLineCard = 0,
          eNetworkModule = 1,
          eInterfaceCard = 2,
          ePtRouterModule = 3,
          ePtSwitchModule = 4,
          ePtCloudModule = 5,
          ePtRepeaterModule = 6,
          ePtHostModule = 7,
          ePtModemModule = 8,
          ePtLaptopModule = 9,
          ePtTVModule = 10,
          eIpPhonePowerAdapter = 11,
          ePtTabletPCModule = 12,
          ePtPdaModule = 13,
          ePtWirelessEndDeviceModule = 14,
          ePtWiredEndDeviceModule = 15,
          eTrs35 = 16,
          eUsb = 17,
          eNonRemovableModule = 18,
          eASAModule = 19,
          eASAPowerAdapter = 20,
          ePtCellTowerModule = 21,
          ePtIoeModule = 22,
          ePtIoeNetworkModule = 23,
          ePtIoeAnalogModule = 24,
          ePtIoeDigitalModule = 25,
          ePtIoeCustomIOModule = 26,
          ePtIoePowerAdapter = 27,
          ePtIoeMcuComponentPowerAdapter = 28,
          ePtRouterPowerAdapter = 29,
          eSfpModule = 30,
          eAccessPointPowerAdaptor = 31,
          eNonRemovableInterfaceCard = 32,
          eCustomModuleType = 2000
          
              
      Specified by:
      getModuleType in interface Module
      Returns:
      ModuleType Returns a ModuleType
    • getPortCount

      public int getPortCount()
      Information provided by the PKI file:
      
          \brief Returns the port count.
          
          \return int, the number of ports.
          
              
      Specified by:
      getPortCount in interface Module
      Returns:
      int Returns a int
    • getPortAt

      public Port getPortAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the port at the given index.
          
          \param index, index of the port to retrive.
          
          \return Port, port at the given index.
          
              
      Specified by:
      getPortAt in interface Module
      Parameters:
      index - Takes in a parameter of index
      Returns:
      Port Returns a Port
    • addSlot

      public void addSlot(ModuleType type)
      Information provided by the PKI file:
      
          \brief Adds a slot of the given type.
          
          \param type, Slot type to add.
          Types: eLineCard = 0,
          eNetworkModule = 1,
          eInterfaceCard = 2,
          ePtRouterModule = 3,
          ePtSwitchModule = 4,
          ePtCloudModule = 5,
          ePtRepeaterModule = 6,
          ePtHostModule = 7,
          ePtModemModule = 8,
          ePtLaptopModule = 9,
          ePtTVModule = 10,
          eIpPhonePowerAdapter = 11,
          ePtTabletPCModule = 12,
          ePtPdaModule = 13,
          ePtWirelessEndDeviceModule = 14,
          ePtWiredEndDeviceModule = 15,
          eTrs35 = 16,
          eUsb = 17,
          eNonRemovableModule = 18,
          eASAModule = 19,
          eASAPowerAdapter = 20,
          ePtCellTowerModule = 21,
          ePtIoeModule = 22,
          ePtIoeNetworkModule = 23,
          ePtIoeAnalogModule = 24,
          ePtIoeDigitalModule = 25,
          ePtIoeCustomIOModule = 26,
          ePtIoePowerAdapter = 27,
          ePtIoeMcuComponentPowerAdapter = 28,
          ePtRouterPowerAdapter = 29,
          eSfpModule = 30,
          eAccessPointPowerAdaptor = 31,
          eNonRemovableInterfaceCard = 32,
          eCustomModuleType = 2000
          
              
      Specified by:
      addSlot in interface Module
      Parameters:
      type - Takes in a parameter of type
    • getSlotCount

      public int getSlotCount()
      Information provided by the PKI file:
      
          \brief Returns the total slot count.
          
          \return int, the total slot count.
          
              
      Specified by:
      getSlotCount in interface Module
      Returns:
      int Returns a int
    • getSlotTypeAt

      public ModuleType getSlotTypeAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the type of the module at the given index.
          
          \param index, index of the module to find the type for.
          
          \return  ModuleType, the type of the module.
          
              
      Specified by:
      getSlotTypeAt in interface Module
      Parameters:
      index - Takes in a parameter of index
      Returns:
      ModuleType Returns a ModuleType
    • removeModuleAt

      public void removeModuleAt(int index)
      Information provided by the PKI file:
      
          \brief Removes the module at the given index.
          
          \param index, index of the module to remove.  Range (0, getModuleCount - 1).
          
              
      Specified by:
      removeModuleAt in interface Module
      Parameters:
      index - Takes in a parameter of index
    • getModuleCount

      public int getModuleCount()
      Information provided by the PKI file:
      
          \brief Returns the number modules.
          
          \return int, the number of modules.
          
              
      Specified by:
      getModuleCount in interface Module
      Returns:
      int Returns a int
    • getModuleAt

      public Module getModuleAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the module at the given index.
          
          \param index, index of the module to get.  Range (0, getModuleCount - 1).
          
          \return Module, the module found at the given index.
          
              
      Specified by:
      getModuleAt in interface Module
      Parameters:
      index - Takes in a parameter of index
      Returns:
      Module Returns a Module
    • getOwnerDevice

      public Device getOwnerDevice()
      Information provided by the PKI file:
      
          \brief Returns owner device of the module.
          
          \return Device, the device that owns the module.
          
              
      Specified by:
      getOwnerDevice in interface Module
      Returns:
      Device Returns a Device
    • getDescriptor

      public ModuleDescriptor getDescriptor()
      Information provided by the PKI file:
      
          \brief Returns the descriptor of the module.  Descriptor contains device model, position, etc.
          
          \return ModuleDescriptor, the module descriptor.
          
              
      Specified by:
      getDescriptor in interface Module
      Returns:
      ModuleDescriptor Returns a ModuleDescriptor
    • addModuleAt

      public boolean addModuleAt(String moduleId, int index)
      Information provided by the PKI file:
      
          \brief Adds a module at the specified location.
          
          \param moduleId, module type to add.  Something like "NM-2W".
          \param index, index to add at.
          
          \return bool, true if the module was added, false if not.
          
              
      Specified by:
      addModuleAt in interface Module
      Parameters:
      moduleId - Takes in a parameter of moduleId
      index - Takes in a parameter of index
      Returns:
      boolean Returns a boolean